package model.assessment;

import java.util.Objects;

public class Question {
    private String name;
    private String type;
    private String answers_0;
    private String answers_1;
    private String answers_2;
    private String uid;
    private boolean isDeleted = false;

    public Question() {
    }

    public Question(String name, String type, String answers_0,
                    String answers_1, String answers_2,
                    String uid) {
        this.name = name;
        this.type = type;
        this.answers_0 = answers_0;
        this.answers_1 = answers_1;
        this.answers_2 = answers_2;
        this.uid = uid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getAnswers_0() {
        return answers_0;
    }

    public void setAnswers_0(String answers_0) {
        this.answers_0 = answers_0;
    }

    public String getAnswers_1() {
        return answers_1;
    }

    public void setAnswers_1(String answers_1) {
        this.answers_1 = answers_1;
    }

    public String getAnswers_2() {
        return answers_2;
    }

    public void setAnswers_2(String answers_2) {
        this.answers_2 = answers_2;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public boolean isDeleted() {
        return isDeleted;
    }

    public void setDeleted(boolean deleted) {
        isDeleted = deleted;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Question question = (Question) o;
        return isDeleted == question.isDeleted && Objects.equals(uid, question.uid);
    }

    @Override
    public String toString() {
        return "Question{" +
                "name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", answers_0='" + answers_0 + '\'' +
                ", answers_1='" + answers_1 + '\'' +
                ", answers_2='" + answers_2 + '\'' +
                ", uid='" + uid + '\'' +
                '}';
    }
}
